package com.example.dmy.bootoauth.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: daimengying
 * @Date: 2019/1/5 15:09
 * @Description:
 */
@RestController
public class TestEndpoints {

    @GetMapping("/hello")
    public String hello() {
        return "hello";
    }

    @GetMapping("/getCode")
    public String getCode(HttpServletRequest req) {
        String code=req.getParameter("code");
        return "my code :"+code;
    }


}